package com.raja.requestForwarding.mq.rabbitmq.send;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created by liuyanjun
 * on 2017/7/24.
 */
@Component
public class MqSender {

    @Autowired
    private AmqpTemplate amqpTemplate;

    public void send(String queue,String msg) throws Exception{
        amqpTemplate.convertAndSend(queue,msg);
    }
}
